﻿<Window x:Class="MongoLP.ConnectionDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Universal Demo Connection"
    Background="{x:Static SystemColors.ControlBrush}"
    SizeToContent="Height"
    Width="336" 
    WindowStartupLocation="CenterScreen">
    <StackPanel Margin="7">

        <DockPanel>
            <Label Padding="0,0,0,1">Mongo Connection String:</Label>
        </DockPanel>

        <TextBox Name="txtConnectionString" Margin="0,0,0,12" Text="{Binding AppConfigPath}"/>

        <DockPanel>
            <Label DockPanel.Dock="Right" Padding="1">
                <Hyperlink Click="BrowseAssembly">Browse...</Hyperlink>
            </Label>
            <Label Padding="0,0,0,1">Path to custom assembly:</Label>
        </DockPanel>

        <TextBox Name="txtAssemblyPath" Margin="0,0,0,6" Text="{Binding CustomTypeInfo.CustomAssemblyPath}"/>

        <DockPanel>
            <Label DockPanel.Dock="Right" Padding="1">
                <Hyperlink Click="ChooseType">Choose...</Hyperlink>
            </Label>
            <Label Padding="0,0,0,1">Model Interface (Full path):</Label>
        </DockPanel>

        <TextBox Name="txtNameSpace" Margin="0,0,0,6" Text="{Binding CustomTypeInfo.CustomTypeName}"/>

        <CheckBox IsChecked="{Binding Persist}">Remember this connection</CheckBox>

        <DockPanel LastChildFill="False" Margin="0,10,0,0">
            <Button Name="btnCancel" DockPanel.Dock="Right" Content="Cancel" Margin="5,0,0,0" Padding="8,2" MinWidth="60" IsCancel="True" TabIndex="2" />
            <Button Name="btnOK" DockPanel.Dock="Right" Content="OK" Margin="5,0,0,0" Padding="8,2" MinWidth="60" IsDefault="True" TabIndex="1" Click="BtnOkClick" />
        </DockPanel>

    </StackPanel>
</Window>
